/*
 * Copyright (c) 2021 HiSilicon (Shanghai) Technologies CO., LIMITED.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

#ifndef __ZDIAG_STAT_H__
#define __ZDIAG_STAT_H__

#include <td_base.h>
#include "zdiag_common.h"
#include "zdiag_config.h"
#include "soc_zdiag.h"

typedef struct {
    TD_CONST td_zdiag_sys_stat_obj *stat_cmd_list[CONFIG_STAT_CMD_LIST_NUM];  /* Stat. cmd obj list */
    td_u16 aus_stat_cmd_num[CONFIG_STAT_CMD_LIST_NUM];
} zdiag_stat_ctrl;

typedef struct {
    td_u16 obj_id;
    td_pbyte object;
    td_u16 obj_size;
    td_u16 obj_cnt;
    diag_option *option;
    td_bool sync;
    td_u8 pad[2]; /* pad(2) */
} zdiag_report_stat_obj_stru;

ext_errno zdiag_report_stat_obj(zdiag_report_stat_obj_stru pkt);
ext_errno zdiag_query_stat_obj(td_u32 id, td_u32 *obj, td_u16 *obj_len, td_u16 *obj_cnt);

#endif /* __ZDIAG_STAT_H__ */
